---
title: Building Agents
sidebarTitle: Building Agents
description: Learn how to build Agents with Agno.
---

To build effective agents, start simple -- just a model, tools, and instructions. Once that works, layer in more functionality as needed.

It's also best to begin with well-defined tasks like report generation, data extraction, classification, summarization, knowledge search, and document processing. These early wins help you identify what works, validate user needs, and set the stage for advanced systems.

Here's the simplest possible report generation agent:

```python hackernews_agent.py lines
from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.tools.hackernews import HackerNewsTools

agent = Agent(
    model=Claude(id="claude-sonnet-4-5"),
    tools=[HackerNewsTools()],
    instructions="Write a report on the topic. Output only the report.",
    markdown=True,
)
agent.print_response("Trending startups and products.", stream=True)
```

## Run your Agent

When running your agent, use the `Agent.print_response()` method to print the response in the terminal. This is only for development purposes and not recommended for production use. In production, use the `Agent.run()` or `Agent.arun()` methods. For example:

```python
from typing import Iterator
from agno.agent import Agent, RunOutput, RunOutputEvent, RunEvent
from agno.models.anthropic import Claude
from agno.tools.hackernews import HackerNewsTools
from agno.utils.pprint import pprint_run_response

agent = Agent(
    model=Claude(id="claude-sonnet-4-5"),
    tools=[HackerNewsTools()],
    instructions="Write a report on the topic. Output only the report.",
    markdown=True,
)

# Run agent and return the response as a variable
response: RunOutput = agent.run("Trending startups and products.")
# Print the response
print(response.content)

################ STREAM RESPONSE #################
stream: Iterator[RunOutputEvent] = agent.run("Trending products", stream=True)
for chunk in stream:
    if chunk.event == RunEvent.run_content:
        print(chunk.content)

# ################ STREAM AND PRETTY PRINT #################
stream: Iterator[RunOutputEvent] = agent.run("Trending products", stream=True)
pprint_run_response(stream, markdown=True)
```

Next, continue building your agent by adding functionality as needed. Common questions:

- **How do I run my agent?** -> See the [running agents](/concepts/agents/running-agents) documentation.
- **How do I manage sessions?** -> See the [agent sessions](/concepts/agents/sessions) documentation.
- **How do I manage input and capture output?** -> See the [input and output](/concepts/agents/input-output) documentation.
- **How do I add tools?** -> See the [tools](/concepts/agents/tools) documentation.
- **How do I give the agent context?** -> See the [context engineering](/concepts/agents/context) documentation.
- **How do I add knowledge?** -> See the [knowledge](/concepts/agents/knowledge) documentation.
- **How do I handle images, audio, video, and files?** -> See the [multimodal](/concepts/multimodal) documentation.
- **How do I add guardrails?** -> See the [guardrails](/concepts/agents/guardrails) documentation.
- **How do I cache model responses during development?** -> See the [response caching](/concepts/models/cache-response) documentation.

## Developer Resources

- View the [Agent reference](/reference/agents/agent)
- View [Agent Cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/agents/README.md)
